<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>角色管理</title>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery1.9.0.min.js"></script>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/xcConfirm.css"/>
<script src="${pageContext.request.contextPath }/js/xcConfirm.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	$(document).ready(function(){
		
	});
	
	
	function saveLineUpdate(){
   		$.ajax({
   			url:'saveLineUpdateAction.action',//请求的远程url
   			data:$("#actionForm").serialize(),//发送到服务器的数据
   			type:"POST",//默认值: "GET")。请求方式 ("POST" 或 "GET")
   			dataType:"json",//服务器返回的数据类型，有几种返回类型：xml,html,script,json,text(默认)
   			success:function(data){ //请求成功后的回调函数
   				var jsonMap = eval("(" + data + ")");
				var res = jsonMap.res;
				var error  = jsonMap.error;
				if(res == true){
   					var txt=  "保存成功";
					window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.success);
   				}else{
   					var txt=  "保存失败,"+error;
					window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
   				}
   				
   			}
   		});
	}
	
</script>
<style type="text/css">
  .label-class{background-image:url(${pageContext.request.contextPath }/img/chacunclick.png) }
  .css-a{text-decoration: none;color: #FFFFFF}
  td{text-align: center;height:40px; }
</style>
</head>
<body>
   <div>
     <form id="actionForm" method="post">
      <input type="hidden" name="regionid" value="<%=request.getParameter("regionid") %>">
      <input type="hidden" name="lineid" value="<%=request.getParameter("lineid") %>">
         <div>
               <table width="100%">
                  <tr>
                      <td width="80%"></td>
                      <td width="10%" class="label-class"><label><a href="pathQuery.jsp" class="css-a">返回</a></label></td>
                  </tr>
               </table>
         </div>
         <div>
            <table width="100%">
            <tr>
              <td width="20%"><label>路线编号:</label></td>
              <td width="20%"><input  size="40"  type="text" value="<%=request.getParameter("lineid") %>" disabled="disabled"></input></td>
              <td width="60%"></td>
            </tr>
            <tr>
              <td width="10%"><label>所属区域:</label></td>
              <td><input id="regionName"  size="40"  type="text" name="regionname" value="<%=new String(request.getParameter("regionname").getBytes("ISO-8859-1"),"utf-8") %>" disabled="disabled"></input></td>
            </tr>
            <tr>
              <td width="10%"><label>路线详情:</label></td>
              <td><input id="lineDetail"  size="40"  type="text" name="linedetail" value="<%=new String(request.getParameter("linedetail").getBytes("ISO-8859-1"),"utf-8") %>"></input></td>
            </tr>
         </table>
         </div>    
		   <table width="100%">
              <tr>
                  <td width="90%"></td>
                  <td width="10%" class="label-class"><label><a href="#" onclick="saveLineUpdate()" class="css-a">保存</a></label></td>
              </tr>
          </table>
     </form>
   </div>
</body>
</html>